package Information;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

public class PostInfo implements Serializable {
    private String postId;          //帖子ID
    private String authorId;        //作者ID
    private String createdTime;     //创建时间
    private String tag;             //帖子标签
    private String img;             //图片
    private int views;              //浏览次数
    private int comments;           //评论数
    private int likes;              //点赞量
    private int collections;        //收藏数
    private int shares;             //分享数
    private String titlePath;       //标题路径
    private String textPath;        //正文路径

    private ArrayList<String> likedByUserID;        //已点赞用户
    private ArrayList<String> commentedByUserID;    //已评论用户
    private ArrayList<String> collectedByUserID;    //已收藏用户
    private ArrayList<String> sharedByUserID;       //已分享用户
    private ArrayList<CommentInfo> commentsArray;   //评论区

    public PostInfo(){//空参构造器
        this.postId = "";
        this.authorId = "";
        this.createdTime = "";
        this.tag = "";
        this.img = "";
        this.views = 0;
        this.comments = 0;
        this.likes = 0;
        this.collections = 0;
        this.shares = 0;
        this.likedByUserID = new ArrayList<>();
        this.commentedByUserID = new ArrayList<>();
        this.collectedByUserID = new ArrayList<>();
        this.sharedByUserID = new ArrayList<>();
        this.commentsArray = new ArrayList<>();
    }

    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public String getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public int getViews() {
        return views;
    }

    public void setViews(int views) {
        this.views = views;
    }

    public int getComments() {
        return comments;
    }

    public void setComments(int comments) {
        this.comments = comments;
    }

    public int getLikes() {
        return likes;
    }

    public void setLikes(int likes) {
        this.likes = likes;
    }

    public String getTitlePath() {
        return titlePath;
    }

    public void setTitlePath(String titlePath) {
        this.titlePath = titlePath;
    }

    public String getTextPath() {
        return textPath;
    }

    public void setTextPath(String textPath) {
        this.textPath = textPath;
    }

    public int getCollections() {
        return collections;
    }

    public void setCollections(int collections) {
        this.collections = collections;
    }

    public int getShares() {
        return shares;
    }

    public void setShares(int shares) {
        this.shares = shares;
    }

    public ArrayList<String> getLikedByUserID() {
        return likedByUserID;
    }

    public void setLikedByUserID(ArrayList<String> likedByUserID) {
        this.likedByUserID = likedByUserID;
    }

    public ArrayList<String> getCommentedByUserID() {
        return commentedByUserID;
    }

    public void setCommentedByUserID(ArrayList<String> commentedByUserID) {
        this.commentedByUserID = commentedByUserID;
    }

    public ArrayList<String> getCollectedByUserID() {
        return collectedByUserID;
    }

    public void setCollectedByUserID(ArrayList<String> collectedByUserID) {
        this.collectedByUserID = collectedByUserID;
    }

    public ArrayList<String> getSharedByUserID() {
        return sharedByUserID;
    }

    public void setSharedByUserID(ArrayList<String> sharedByUserID) {
        this.sharedByUserID = sharedByUserID;
    }

    public ArrayList<CommentInfo> getCommentsArray() {
        return commentsArray;
    }

    public void setCommentsArray(ArrayList<CommentInfo> commentsArray) {
        this.commentsArray = commentsArray;
    }
}
